#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pymysql

import sys, os
path = os.path.abspath('../..')+'/ark_project'
sys.path.append(path)  # 会追加到列表最尾部
from settings import my_settings
settings=my_settings.mysqlSettings()
settings=settings.mysql_conf
MYSQL_HOST=settings['MYSQL_HOST']
MYSQL_PORT=settings['MYSQL_PORT']
MYSQL_DB=settings['MYSQL_DB']
MYSQL_USER=settings['MYSQL_USER']
MYSQL_PASSWD=settings['MYSQL_PASSWD']
MYSQL_CHARTSET=settings['MYSQL_CHARTSET']

db = pymysql.connect(
            host=MYSQL_HOST,
            port=MYSQL_PORT,
            database=MYSQL_DB,
            user=MYSQL_USER,
            password=MYSQL_PASSWD,
            charset=MYSQL_CHARTSET
        )
# 使用cursor()方法获取操作游标
cursor = db.cursor()

if __name__=='__main__':
    same_date_list = ['2021-06-08', '2021-06-10', '2021-06-09']
    same_date_list.sort()
    print(same_date_list)
